#ifndef __LED_H
#define __LED_H

#include "stm32f0xx.h"
  
#define	INT8U	unsigned char
#define	INT16U	unsigned int
#define INT32U  unsigned long 
#define INT8S	char
#define INT16S  int
#define INT32S	signed long 

#define	u8	unsigned char
#define	u16	unsigned int
#define u32  unsigned long 
	
typedef volatile unsigned long  vu32;
typedef volatile unsigned short vu16;
typedef volatile unsigned char  vu8;

#define SET_20_18           18


#define LED_SYS_GPIO_PORT           GPIOF
#define LED_ALM_GPIO_PORT           GPIOF
#define LED_SYS_GPIO_PIN      			GPIO_Pin_6
#define LED_ALM_GPIO_PIN      			GPIO_Pin_7
#define LED_SYS_ONOFF(x)     			  GPIO_WriteBit(GPIOF,GPIO_Pin_6,x);

#define LEDBL_ONOFF(x)     			GPIO_WriteBit(GPIOF,GPIO_Pin_0,x);

#define KEY_2								GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_12)
#define KEY_0								GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_11)
#define KEY_1								GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_8)


#define FLASH_SAVE_ADDR  0X0800F000		//??FLASH ????(?????,????????????FLASH???+0X08000000)


void LED_GPIO_Config(void);	
void key0_event(void);
void key1_event(void);
void key2_event(void);
void	keyset_event(void);

#endif
